package com.wb.system.service.impl;

import com.wb.common.vo.ExamsLevelModelVO;
import com.wb.common.vo.ExamsLevelReqVO;
import com.wb.system.domain.ExamsLevelEntity;
import com.wb.system.mapper.ExamsLevelMapper;
import com.wb.system.service.ExamsLevelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ExamsLevelServiceImpl implements ExamsLevelService {
    @Resource
    private ExamsLevelMapper examsLevelMapper;

    @Override
    public List<ExamsLevelEntity> selectExamsLevelList(ExamsLevelModelVO examsLevelModelVO) {
        return examsLevelMapper.selectExamsLevelList(examsLevelModelVO);
    }

    @Override
    public ExamsLevelEntity selectById(Long id) {
        return examsLevelMapper.selectById(id);
    }

    @Override
    public void saveExamsLevel(ExamsLevelEntity examsLevelEntity) {
        examsLevelMapper.save(examsLevelEntity);
    }

    @Override
    public void updateExamsLevelById(ExamsLevelEntity examsLevelEntity) {
        examsLevelMapper.updateExamsTypeById(examsLevelEntity);
    }

    @Override
    public void removeExamsLevelByIds(List<Long> ids) {
        if (ids != null && ids.size() > 0) {
            for (Long id : ids) {
                examsLevelMapper.removeExamsTypeById(id);
            }
        }
    }

    @Override
    public List<ExamsLevelEntity> listByExamTypeId(ExamsLevelReqVO vo) {
        return examsLevelMapper.listByExamTypeId(vo);
    }
}
